<?php get_instance()->view('common/header');?>
<div class="page-container home">
    <?php get_instance()->view('common/sidebar');?>
    <style>
        .text-val{
            padding: 8px;
        }
        .text-else{
            padding-left: 50px;
            color: blue;
        }
        .col-md-3 {
 			width:20%;
 		}
 		.top-news a, .top-news em, .top-news span {
		    display: block;
		    text-align: center;
		}
    </style>
    <div class="page-content-wrapper">
        <div class="page-content">
            <div class="row">
                <div class="col-md-12">
                    <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                    <h3 class="page-title"> 运单统计 </h3>

                    <!-- END PAGE TITLE & BREADCRUMB-->
                </div>
            </div>
            <!--开始-->
            <div class="row">
                <div class="col-md-12">
                    <!-- BEGIN VALIDATION STATES-->
                                <div class="tab-content">
                                    <div class="tab-pane active" id="tab_1_1">
                                    	<div class="row" style="margin-top:20px;">
                                        	<div class="col-md-12">
                                                <div class="row">
                                                    <div class="col-md-8" style="width:80px;padding-top:7px;padding-right:0px;">
                                                        接单时间：
                                                    </div>
                                                    <div class="col-md-4">
                                                        <div class="input-group" style="width:400px;">
															<span class="input-group-addon">
																起
															</span>
                                                            <input class="form-control form-filter " name="star" dp placeholder="起始时间" type="text" value="<?php $star = get('star'); echo $star ? $star : date('Y-m-d', strtotime('-1month'));?>">
                                                            <span class="input-group-addon">
																止
															</span>
                                                            <input class="form-control form-filter" name="end" dp placeholder="结束时间" type="text" value="<?php $end = get('end');echo $end ? $end : date('Y-m-d');?>">

                                                        </div>

                                                    </div>

                                                </div>
                                                <div class="row">
                                                    <div class="col-md-8" style="color: red">
                                                        *收益/总距离/完成/超时指已完成运单，配送中包含待取货/待完成，接单包含待取货/待完成/已完成
                                                    </div>
                                                </div>
                                             	<div class="portlet">
										            <div class="portlet-body">
										              <div class="table-container">
										                <table class="table table-bordered table-hover" id="datatable">
										                  <thead>
										                    <tr role="row" class="heading">
										                      <th> 配送员 </th>
										                      <th width="100px">电话</th>
										                      <th width="100px">收益</th>
										                      <th width="100px">总距离</th>
										                      <th width="100px">配送中</th>
										                      <th width="100px">接单</th>
										                      <th width="100px">完成</th>
										                      <th width="100px">完成超时</th>
										                      <th width="100px">操作</th>
										                    </tr>
										                  </thead>
										                  <tbody>
										                  </tbody>
										                </table>
										              </div>
										            </div>
										          </div>           
                                            </div>
                                    	</div>
                                    </div>
                    </div>
                    <!-- END VALIDATION STATES-->
                </div>
            </div>
            <!--结束-->
        </div>
    </div>
</div>
<script type="text/javascript">
	$(function(){
		datatable_init({
			"sDom": "<'row'<'col-md-5 col-sm-12'<'table-group-actions pull-right'>>r><'table-scrollable't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>",
			src: $("#datatable"),
			sAjaxSource: "<?php echo getUrl('deliveryman/statistics/getList');?>",
            aoColumnDefs : [{
                'bSortable' : false,
                'aTargets' : [ 0,1,8]
            }],
            "fnDrawCallback": function (oSettings) {
                var json=jQuery.parseJSON(oSettings.jqXHR.responseText);//获取后台方式 直接可以拿到json 之后进行处理

            },
        });
	});
    $('[dp]').not("[noinit]").datepicker({
        changeMonth: true,
        autoclose: true,
        format: "yyyy-mm-dd",
        language: 'zh-CN'
    }).on('changeDate', function(ev){
        $('#datatable').dataTable().fnDraw();
    });
    $('.portrait').live('mouseover', function(){
        $(this).before('<img class="mouse-img" style="width:100px;height:100px;position:absolute;top:-104px;border: 2px solid #203140;" src="'+$(this).attr('src')+'">');
    });
    $('.portrait').live('mouseout', function(){
        $(this).parent().find('.mouse-img').remove();
    });
</script>
</body>
</html>